\documentclass[xcolor={usenames,svgnames}]{beamer}

\usepackage[francais]{babel}
\usepackage{rtxslides}
\usepackage{listings}
\usepackage{tikz}
\usetikzlibrary{shapes,fit}

\lstdefinelanguage{rathaxes}%
{
	morekeywords={
        interface, extend,                      % interfaces : decl
        device, configuration, driver,          % devices
        with, values,                           % backend+interface
        builtin, provided, required, optional,  % interfaces: implem
        type, sequence, variable,               % general: element type
        pointcut, chunk,                        % for aspectual concepts
        template                                % backend
    },%
	morecomment=[l][\color{Gainsboro}]{//},%
 	morecomment=[l][\color{Gainsboro}]{\#},%
	morecomment=[s][\color{Gainsboro}]{/*}{*/},%
	morestring=[b][\color{Gold}]",%
	morestring=[b][\color{Gold}]',%
	keywordstyle={\color{Tomato}}%
}[keywords,comments,strings]

\lstset{
    language=rathaxes,
    tabsize=4,
    captionpos=b,
    emptylines=0,
    breaklines=false,
    breakatwhitespace=false,        % sets if automatic breaks should only happen at whitespace
    extendedchars=false,
    showstringspaces=false,
    showspaces=false,
    numbersep=1ex,
    showtabs=false,
    basicstyle=\color{white}\scriptsize\ttfamily,
    numberstyle=\color{Gainsboro}\scriptsize\ttfamily,
    stepnumber=1,                   % the step between two line-numbers. If it's 1, each line
    keywordstyle=\color{Tomato},
    commentstyle=\color{Gainsboro},
    stringstyle=\color{white},
    backgroundcolor=\color{black},
    escapeinside={\%*}{*)},         % if you want to add a comment within your code
    morekeywords={*,...}            % if you want to add more keywords to the set
}

\title{\rtx\ -- RMLL 2011}
\date{13 Juillet 2011}
\author{L. Auroux \& D. Pineau \\ \texttt{www.rathaxes.org}}

\definecolor{lightred}{RGB}{147,36,33}
\tikzset{componentarrow/.style={->, >=stealth, color=rathaxesred, ultra thick}}

\newcommand{\cemph}[1]{{\itshape{\textcolor{rathaxesred}{#1}}}}

\newcommand{\tred}[1]{\textcolor{rathaxesred}{#1}}

\tikzset{warrow/.style={->, >=stealth, color=white, ultra thick}}

\tikzset{graybox/.style={draw,rectangle,rounded corners=3pt,very thick,densely dashed,color=gray!75,text=white}}
\tikzset{redbox/.style={draw,rectangle,rounded corners=5pt,ultra thick,color=rathaxesred,text=white}}
\tikzset{redcontainer/.style={draw,rectangle,rounded corners=5pt,ultra thick,color=rathaxesred,text=white,minimum height=3.5cm,minimum width=2.5cm}}

\begin{document}

\begin{frame}
\titlepage
\end{frame}

\begin{frame}{Historique du projet}
\begin{center}
\Large{%
	\begin{itemize}
		\item 2002: Thèse de L. Reveillere \emph{«~Devil~»} ;
		\item 2007: Début du projet LSE -- EIP Epitech ;
		\item 2008: RMLL / T-DOSE.
	\end{itemize}
}
\end{center}
\end{frame}


\begin{frame}{Pilotes de périphériques}
\begin{center}
\only<1>{\LARGE{Souvent \cemph{\Huge{instables}} et \cemph{\Huge{bancals}}}}
\only<2>{%
\large{\itshape{\rmfamily{«~\tred{30 \%} of Windows Vista \tred{crashes} caused by \tred{Nvidia drivers}~»}}}

\vspace{1cm}
\raggedleft\large{2.6.39: \itshape{\rmfamily{«~les pilotes (\tred{65 \% des patchs})~»}} (patrick\_g)}

\vspace{1cm}
\large{2.6.35: \itshape{\rmfamily{«~les \tred{deux tiers des changements} dans les pilotes~»}}}
}
\end{center}
\end{frame}

\begin{frame}{Développement de pilotes de périphériques}
\begin{center}
\only<1>{\Large{Une tâche \cemph{\LARGE{difficile}}, \cemph{\LARGE{longue}} et \cemph{\LARGE{fastidieuse}}}}
\only<2>{\Large{%
\begin{itemize}
\item Compétences requises ;
\item Portabilité ;
\item Maintenance.
\end{itemize}
}}
\end{center}
\end{frame}

\begin{frame}{Objectifs du DSL \rtx}
\begin{center}
\only<1>{\Large{\cemph{\LARGE{Simplifier}} les cycles de développement}}
\only<2>{\Large{\begin{itemize}
\item Abstraction de la plateforme ;
\item Vérifications statiques ;
\item Séparation des compétences.
\end{itemize}}}
\end{center}
\end{frame}

\begin{frame}[fragile]{Qu'est ce qu'un driver}
\begin{center}
       \includegraphics[scale=0.4]{stateofdevice.pdf}
\end{center}
\end{frame}
%\begin{frame}[fragile]{Qu'est ce qu'un driver}
%\begin{tikzpicture}[overlay]
%\node[redbox,minimum width=6cm,minimum height=1cm, rotate=270] (DEV) at (1,0) {\Large{Périphériques}};
%\node[graybox, minimum width=5cm,minimum height=8mm, rotate=270, above] at (DEV.north) {Registres};
%
%\node[redbox, minimum height=6cm, minimum width=15mm, ] (BUS) at (3.7,0) {};
%\draw (BUS.north) node [below]{\Large{BUS}};
%\node[graybox] (PCI) at (BUS.center) {PCI};
%\node[graybox] (ISA) at (3.7,1) {ISA};
%\node[graybox] (I2C) at (3.7,-1) {I\textsuperscript{2}C};
%\end{tikzpicture}
%\end{frame}

\begin{frame}{Outils utilisés}
	\begin{center}
        \Large{%
	\begin{itemize}
		\item	Langage CodeWorker {\small (\url{http://www.codeworker.org/})} ;
		\item	Front-end C : cnorm {\small (\url{http://code.google.com/p/cnorm/})}.
	\end{itemize}
        }
	\end{center}
\end{frame}

\begin{frame}{Première approche}
	\begin{center}
	\Huge{\emph{Démonstration}}
	\end{center}
\end{frame}

\begin{frame}{Génération d'un pilote}
\only<1>{\begin{tikzpicture}[overlay]
\node (RTX) at (2,2.5) {\includegraphics[height=1.5cm]{icons/rtx}};
\node[redbox] (COMPILER) at (2,-0.5) {Compilateur};
\node (C) at (2,-3.5) {\includegraphics[height=1.5cm]{icons/c}};

\draw[warrow] (RTX)--(COMPILER);
\draw[warrow] (COMPILER)--(C);

\draw (RTX.north east) node[below right]{%
\begin{minipage}{9cm}
\large{Description du pilote :}
\small{
\begin{itemize}
\item Description du matériel ;
\item Algorithmes ;
\item Paramètres spécifiques à chaque système.
\end{itemize}}
\end{minipage}};

\draw (C.north east) node [below right]{\large{Module noyau}};
\end{tikzpicture}}

\only<2>{\begin{tikzpicture}[overlay]
\node (RTX) at (2,2.5) {\includegraphics[height=1.5cm]{icons/rtx}};
\node[redbox] (COMPILER) at (2,-0.5) {Compilateur};
\node (C) at (2,-3.5) {\includegraphics[height=1.5cm]{icons/c}};

\draw[warrow] (RTX)--(COMPILER);
\draw[warrow] (COMPILER)--(C);

\node[below right] (H1) at (RTX.north east) {%
\begin{minipage}{7.5cm}
\large{Description du pilote :} \\
\small{\texttt{
\textcolor{Tomato}{driver} Pipe use LKM, CharDev, Algorithms \{
\hspace*{1ex} open(Context ctx) \{ \\
\hspace*{2ex} log(\textcolor{Gold}{“Open called on device Pipe”}); \\
\hspace*{1ex} \} \\
\}
}}
\end{minipage}};
\draw (C.north east) node [below right]{\large{Module noyau}};
\end{tikzpicture}}

\only<3>{\begin{tikzpicture}[overlay]
\node[opacity=0.3] (RTX) at (2,2.5) {\includegraphics[height=1.5cm]{icons/rtx}};
\node[redcontainer] (COMPILER) at (2,-0.5) {};
\node[opacity=0.3] (C) at (2,-3.5) {\includegraphics[height=1.5cm]{icons/c}};

\draw[warrow,opacity=0.3] (RTX)--(COMPILER);
\draw[warrow,opacity=0.3] (COMPILER)--(C);

\draw (RTX.north east) node[below right, opacity=0.3]{\large{Description du pilote}};
\draw (COMPILER.south east) node[above right]{\Large{Compilateur}};
\draw (C.north east) node [below right, opacity=0.3]{\large{Module noyau}};
\end{tikzpicture}}

\only<4>{\begin{tikzpicture}[overlay]
\node[opacity=0.3] (RTX) at (2,2.5) {\includegraphics[height=1.5cm]{icons/rtx}};
\draw (RTX.north east) node[below right, opacity=0.3]{\large{Description du pilote}};

\node[opacity=0.3] (C) at (2,-3.5) {\includegraphics[height=1.5cm]{icons/c}};

\node[graybox] (AST1) at (2,0.5){\texttt{AST}};
\draw[warrow] (RTX)--(AST1);

%\node[graybox] (AST2) at (2,-1.5) {\texttt{AST}};
%\draw[warrow] (AST2)--(C);

\node[redcontainer] (COMPILER) at (2,-0.5) {};
\draw (COMPILER.south east) node[above right]{\Large{Compilateur}};

%\node[graybox] (RTXLINK) at (COMPILER.center) {\texttt{RTX\_Link}};
%\draw[warrow] (AST1)--(RTXLINK);
%\draw[warrow] (RTXLINK)--(AST2);

\draw[warrow,opacity=0.3] (COMPILER)--(C);
\draw (C.north east) node [below right, opacity=0.3]{\large{Module noyau}};
\end{tikzpicture}}

\only<5>{\begin{tikzpicture}[overlay]
\node[opacity=0.3] (RTX) at (2,2.5) {\includegraphics[height=1.5cm]{icons/rtx}};
\draw (RTX.north east) node[below right, opacity=0.3]{\large{Description du pilote}};

\node[opacity=0.3] (C) at (2,-3.5) {\includegraphics[height=1.5cm]{icons/c}};

\node[graybox] (AST1) at (2,0.5){\texttt{AST}};
\draw[warrow] (RTX)--(AST1);

%\node[graybox] (AST2) at (2,-1.5) {\texttt{AST}};
%\draw[warrow] (AST2)--(C);

\node[redcontainer] (COMPILER) at (2,-0.5) {};
\draw (COMPILER.south east) node[above right]{\Large{Compilateur}};

\node[graybox] (RTXLINK) at (COMPILER.center) {\texttt{RTX\_Link}};
\draw[warrow] (AST1)--(RTXLINK);
%\draw[warrow] (RTXLINK)--(AST2);

\draw[warrow,opacity=0.3] (COMPILER)--(C);
\draw (C.north east) node [below right, opacity=0.3]{\large{Module noyau}};
\end{tikzpicture}}

\only<6>{\begin{tikzpicture}[overlay]
\node[opacity=0.3] (RTX) at (2,2.5) {\includegraphics[height=1.5cm]{icons/rtx}};
\draw (RTX.north east) node[below right, opacity=0.3]{\large{Description du pilote}};

\node[opacity=0.3] (C) at (2,-3.5) {\includegraphics[height=1.5cm]{icons/c}};

\node[graybox] (AST1) at (2,0.5){\texttt{AST}};
\draw[warrow] (RTX)--(AST1);

%\node[graybox] (AST2) at (2,-1.5) {\texttt{AST}};
%\draw[warrow] (AST2)--(C);

\node[redcontainer] (COMPILER) at (2,-0.5) {};
\draw (COMPILER.south east) node[above right]{\Large{Compilateur}};

\node[graybox] (RTXLINK) at (COMPILER.center) {\texttt{RTX\_Link}};
\draw[warrow] (AST1)--(RTXLINK);
%\draw[warrow] (RTXLINK)--(AST2);

\draw[warrow,opacity=0.3] (COMPILER)--(C);

\node (RTI) at (4.5,0.85) {\includegraphics[height=1.3cm]{icons/rti}};
\draw (RTI.east) node[above right]{\Large{Interfaces}};
\draw[warrow] (RTI.west)--(RTXLINK.north);
\draw (C.north east) node [below right, opacity=0.3]{\large{Module noyau}};
\end{tikzpicture}}

\only<7>{\begin{tikzpicture}[overlay]
\node[opacity=0.3] (RTX) at (2,2.5) {\includegraphics[height=1.5cm]{icons/rtx}};
\draw (RTX.north east) node[below right, opacity=0.3]{\large{Description du pilote}};

\node[opacity=0.3] (C) at (2,-3.5) {\includegraphics[height=1.5cm]{icons/c}};

\node[graybox] (AST1) at (2,0.5){\texttt{AST}};
\draw[warrow] (RTX)--(AST1);

%\node[graybox] (AST2) at (2,-1.5) {\texttt{AST}};
%\draw[warrow] (AST2)--(C);

\node[redcontainer] (COMPILER) at (2,-0.5) {};
\draw (COMPILER.south east) node[above right]{\Large{Compilateur}};

\node[graybox] (RTXLINK) at (COMPILER.center) {\texttt{RTX\_Link}};
\draw[warrow] (AST1)--(RTXLINK);
%\draw[warrow] (RTXLINK)--(AST2);

\draw[warrow,opacity=0.3] (COMPILER)--(C);

\node (RTI) at (4.5,0.85) {\includegraphics[height=1.3cm]{icons/rti}};
\draw (RTI.east) node[above right]{\Large{Interfaces}};
\draw[warrow] (RTI.west)--(RTXLINK.north);

\node (BLT) at (4.5,-0.5) {\includegraphics[height=1.3cm]{icons/blt}};
\draw (BLT.east) node[above right]{\Large{Patrons de code}};
\draw[warrow] (BLT.west)--(RTXLINK);
\draw (C.north east) node [below right, opacity=0.3]{\large{Module noyau}};
\end{tikzpicture}}

\only<8>{\begin{tikzpicture}[overlay]
\node[opacity=0.3] (RTX) at (2,2.5) {\includegraphics[height=1.5cm]{icons/rtx}};
\draw (RTX.north east) node[below right, opacity=0.3]{\large{Description du pilote}};

\node[opacity=0.3] (C) at (2,-3.5) {\includegraphics[height=1.5cm]{icons/c}};

\node[graybox] (AST1) at (2,0.5){\texttt{AST}};
\draw[warrow] (RTX)--(AST1);

\node[graybox] (AST2) at (2,-1.5) {\texttt{AST}};
\draw[warrow] (AST2)--(C);

\node[redcontainer] (COMPILER) at (2,-0.5) {};
\draw (COMPILER.south east) node[above right]{\Large{Compilateur}};

\node[graybox] (RTXLINK) at (COMPILER.center) {\texttt{RTX\_Link}};
\draw[warrow] (AST1)--(RTXLINK);
\draw[warrow] (RTXLINK)--(AST2);

\node (RTI) at (4.5,0.85) {\includegraphics[height=1.3cm]{icons/rti}};
\draw (RTI.east) node[above right]{\Large{Interfaces}};
\draw[warrow] (RTI.west)--(RTXLINK.north);

\node (BLT) at (4.5,-0.5) {\includegraphics[height=1.3cm]{icons/blt}};
\draw (BLT.east) node[above right]{\Large{Patrons de code}};
\draw[warrow] (BLT.west)--(RTXLINK);
\draw (C.north east) node [below right, opacity=0.3]{\large{Module noyau}};
\end{tikzpicture}}
\end{frame}

\begin{frame}{Interfaces et patrons de code}
\begin{tikzpicture}[overlay]
\node (RTI) at (1.2,1.6) {\includegraphics[height=1.5cm]{icons/rti}};

\draw (RTI.north east) node[below right]{%
\begin{minipage}{10cm}
Décrivent un \emph{«~sous système~»} avec :
\begin{itemize}
\item Des types ;
\item Des séquences ;
\item Des variables de configuration.
\end{itemize}
\end{minipage}};
\end{tikzpicture}
\end{frame}

\begin{frame}[fragile]{Interfaces et patrons de code}
\begin{tikzpicture}[overlay]
\node (RTI) at (1.2,1.6) {\includegraphics[height=1.5cm]{icons/rti}};

\draw (RTI.east) node[right]{%
\begin{minipage}{10cm}
\begin{lstlisting}
interface CharDev : LKM {
  provided type        Context;
  required sequence    open(Context) {
     provided chunk    LKM::GLOBAL_CODE_DEFINITION;
     provided chunk    LKM::INIT_LKM_FPTRS;
     provided pointcut ALGO;
  }
  required variable identifier  OS;
  required variable serial      version;
}
\end{lstlisting}
\end{minipage}};
\end{tikzpicture}
\end{frame}

\begin{frame}[fragile]{Interfaces et patrons de code}
\begin{tikzpicture}[overlay]
\node (RTI) at (1.2,1.6) {\includegraphics[height=1.5cm]{icons/rti}};

\draw (RTI.east) node[right]{%
\begin{minipage}{10cm}
\begin{lstlisting}
interface CharDev : LKM {
  provided type        Context;
  required sequence    open(Context) {
     provided chunk    LKM::GLOBAL_CODE_DEFINITION;
     provided chunk    LKM::INIT_LKM_FPTRS;
     provided pointcut ALGO;
  }
  required variable identifier  OS;
  required variable serial      version;
}
\end{lstlisting}
\end{minipage}};

\node (BLT) at (1.2,-2.2) {\includegraphics[height=1.5cm]{icons/blt}};

\draw (BLT.north east) node[below right]{%
\begin{minipage}{10cm}
Implémentations des interfaces pour chaque OS :
\begin{itemize}
\item Templates de types ;
\item Templates de séquences.
\end{itemize}
\end{minipage}};
\end{tikzpicture}
\end{frame}

\begin{frame}[fragile]{Interfaces et patrons de code}
\begin{tikzpicture}[overlay]
\node (RTI) at (1.2,1.6) {\includegraphics[height=1.5cm]{icons/rti}};

\draw (RTI.east) node[right]{%
\begin{minipage}{10cm}
\begin{lstlisting}
interface CharDev : LKM {
  provided type        Context;
  required sequence    open(Context) {
     provided chunk    LKM::GLOBAL_CODE_DEFINITION;
     provided chunk    LKM::INIT_LKM_FPTRS;
     provided pointcut ALGO;
  }
  required variable identifier  OS;
  required variable serial      version;
}
\end{lstlisting}
\end{minipage}};

\node (BLT) at (1.2,-2.2) {\includegraphics[height=1.5cm]{icons/blt}};

\draw (BLT.east) node[right]{%
\begin{minipage}{10cm}
\begin{lstlisting}
with CharDev
values OS = Linux, version >= 2.6.27 {
  template sequence CharDev::open(Context ctx) {
     chunk LKM::GLOBAL_CODE_DEFINITION {
         /* C instrumente */
     }
  }
}
\end{lstlisting}
\end{minipage}};
\end{tikzpicture}
\end{frame}

\begin{frame}[fragile]{Tissage des ASTs}
\begin{tikzpicture}[overlay]
\node (RTX) at (1.2,2.4) {\includegraphics[height=1.5cm]{icons/rtx}};
\draw (RTX.east) node[right]{%
\begin{minipage}{115mm}
\begin{lstlisting}
driver Pipe use LKM, CharDev, Algorithms {
  open(Context ctx) {
     log("Open called on device Pipe");
  }
}
\end{lstlisting}
\end{minipage}};

\node (RTI) at (1.2,-0.1) {\includegraphics[height=1.5cm]{icons/rti}};

\draw (RTI.east) node[right]{%
\begin{minipage}{115mm}
\begin{lstlisting}
interface CharDev : LKM {
  provided type        Context;
  required sequence    open(Context) {
     provided chunk    LKM::GLOBAL_CODE_DEFINITION;
     provided chunk    LKM::INIT_LKM_FPTRS;
     provided pointcut ALGO;
  }
  required variable identifier  OS;
  required variable serial      version;
}
\end{lstlisting}
\end{minipage}};

\node (BLT) at (1.2,-3.2) {\includegraphics[height=1.5cm]{icons/blt}};

\draw (BLT.east) node[right]{%
\begin{minipage}{115mm}
\begin{lstlisting}
with CharDev
values OS = Linux, version >= 2.6.27 {
  template sequence CharDev::open(Context ctx) {
     chunk LKM::GLOBAL_CODE_DEFINITION {
         ${pointcut ALGO}
     }
  }
}
\end{lstlisting}
\end{minipage}};
\end{tikzpicture}
\end{frame}

\begin{frame}[fragile]{Tissage des ASTs}
\begin{tikzpicture}[overlay]
\node (RTX) at (1.2,2.4) {\includegraphics[height=1.5cm]{icons/rtx}};
\draw (RTX.east) node[right]{%
\begin{minipage}{115mm}
\begin{lstlisting}
driver Pipe use LKM, CharDev, Algorithms {
  open(Context ctx) {
     log("Open called on device Pipe");
  }
}
\end{lstlisting}
\end{minipage}};

\node (RTI) at (1.2,-0.1) {\includegraphics[height=1.5cm]{icons/rti}};

\draw (RTI.east) node[right]{%
\begin{minipage}{115mm}
\begin{lstlisting}
interface CharDev : LKM {
  provided type        Context;
  required sequence    open(Context) {
     provided chunk    LKM::GLOBAL_CODE_DEFINITION;
     provided chunk    LKM::INIT_LKM_FPTRS;
     provided pointcut ALGO;
  }
  required variable identifier  OS;
  required variable serial      version;
}
\end{lstlisting}
\end{minipage}};

\node (BLT) at (1.2,-3.2) {\includegraphics[height=1.5cm]{icons/blt}};

\draw (BLT.east) node[right]{%
\begin{minipage}{115mm}
\begin{lstlisting}
with CharDev
values OS = Linux, version >= 2.6.27 {
  template sequence CharDev::open(Context ctx) {
     chunk LKM::GLOBAL_CODE_DEFINITION {
         ${pointcut ALGO}
     }
  }
}
\end{lstlisting}
\end{minipage}};
\draw [ultra thick, rounded corners=3pt, color=DodgerBlue] (2.47,-0.74) rectangle (8.22,-1.1);
\draw [ultra thick, color=DodgerBlue, ->, >=stealth] (5.5,-1.1) -- (3.7,-2.19);
\end{tikzpicture}
\end{frame}

\begin{frame}[fragile]{Tissage des ASTs}
\begin{tikzpicture}[overlay]
\node (RTX) at (1.2,2.4) {\includegraphics[height=1.5cm]{icons/rtx}};
\draw (RTX.east) node[right]{%
\begin{minipage}{115mm}
\begin{lstlisting}
driver Pipe use LKM, CharDev, Algorithms {
  open(Context ctx) {
     log("Open called on device Pipe");
  }
}
\end{lstlisting}
\end{minipage}};

\node (RTI) at (1.2,-0.1) {\includegraphics[height=1.5cm]{icons/rti}};

\draw (RTI.east) node[right]{%
\begin{minipage}{115mm}
\begin{lstlisting}
interface CharDev : LKM {
  provided type        Context;
  required sequence    open(Context) {
     provided chunk    LKM::GLOBAL_CODE_DEFINITION;
     provided chunk    LKM::INIT_LKM_FPTRS;
     provided pointcut ALGO;
  }
  required variable identifier  OS;
  required variable serial      version;
}
\end{lstlisting}
\end{minipage}};

\node (BLT) at (1.2,-3.2) {\includegraphics[height=1.5cm]{icons/blt}};

\draw (BLT.east) node[right]{%
\begin{minipage}{115mm}
\begin{lstlisting}
with CharDev
values OS = Linux, version >= 2.6.27 {
  template sequence CharDev::open(Context ctx) {
     chunk LKM::GLOBAL_CODE_DEFINITION {
         ${pointcut ALGO}
     }
  }
}
\end{lstlisting}
\end{minipage}};
\draw [ultra thick, rounded corners=3pt, color=DodgerBlue] (2.47,-0.74) rectangle (8.22,-1.1);
\draw [ultra thick, color=DodgerBlue, ->, >=stealth] (5.5,-1.1) -- (3.7,-2.19);

\draw [ultra thick, rounded corners=3pt, color=LimeGreen] (2.50,0.90) rectangle (8.3,0.55);
\draw [ultra thick, color=LimeGreen, ->, >=stealth] (6.80,0.90) -- (2.9,2.6);
\draw [ultra thick, color=LimeGreen, ->, >=stealth] (6.80,0.55) -- (7.45,-2.50);

\end{tikzpicture}
\end{frame}

\begin{frame}[fragile]{Tissage des ASTs}
\begin{tikzpicture}[overlay]
\node (RTX) at (1.2,2.4) {\includegraphics[height=1.5cm]{icons/rtx}};
\draw (RTX.east) node[right]{%
\begin{minipage}{115mm}
\begin{lstlisting}
driver Pipe use LKM, CharDev, Algorithms {
  open(Context ctx) {
     log("Open called on device Pipe");
  }
}
\end{lstlisting}
\end{minipage}};

\node (RTI) at (1.2,-0.1) {\includegraphics[height=1.5cm]{icons/rti}};

\draw (RTI.east) node[right]{%
\begin{minipage}{115mm}
\begin{lstlisting}
interface CharDev : LKM {
  provided type        Context;
  required sequence    open(Context) {
     provided chunk    LKM::GLOBAL_CODE_DEFINITION;
     provided chunk    LKM::INIT_LKM_FPTRS;
     provided pointcut ALGO;
  }
  required variable identifier  OS;
  required variable serial      version;
}
\end{lstlisting}
\end{minipage}};

\node (BLT) at (1.2,-3.2) {\includegraphics[height=1.5cm]{icons/blt}};

\draw (BLT.east) node[right]{%
\begin{minipage}{115mm}
\begin{lstlisting}
with CharDev
values OS = Linux, version >= 2.6.27 {
  template sequence CharDev::open(Context ctx) {
     chunk LKM::GLOBAL_CODE_DEFINITION {
         ${pointcut ALGO}
     }
  }
}
\end{lstlisting}
\end{minipage}};
\draw [ultra thick, rounded corners=3pt, color=DodgerBlue] (2.47,-0.74) rectangle (8.22,-1.1);
\draw [ultra thick, color=DodgerBlue, ->, >=stealth] (5.5,-1.1) -- (3.7,-2.19);

\draw [ultra thick, rounded corners=3pt, color=LimeGreen] (2.50,0.90) rectangle (8.3,0.55);
\draw [ultra thick, color=LimeGreen, ->, >=stealth] (6.80,0.90) -- (2.9,2.6);
\draw [ultra thick, color=LimeGreen, ->, >=stealth] (6.80,0.55) -- (7.45,-2.50);

\draw [ultra thick, rounded corners=3pt, color=MediumOrchid] (3,-0.09) rectangle (7,-0.43);
\draw [ultra thick, color=MediumOrchid, ->, >=stealth] (5.8,-0.09) -- (5,2.27);
\draw [ultra thick, color=MediumOrchid, ->, >=stealth] (5.8,-0.41) -- (5,-3.22);
\end{tikzpicture}
\end{frame}

\begin{frame}{Tissage des ASTs}
\begin{tikzpicture}[overlay]
\node (RTX) at (1.2,2.4) {\includegraphics[height=1.5cm]{icons/rtx}};
\draw (RTX.east) node[right]{\LARGE{Arbre d'\emph{« advices »}}};

\node (RTI) at (1.2,-0.1) {\includegraphics[height=1.5cm]{icons/rti}};

\draw (RTI.east) node[right]{\LARGE{\emph{« Abstraction »} du backend}};

\node (BLT) at (1.2,-3.2) {\includegraphics[height=1.5cm]{icons/blt}};

\draw (BLT.east) node[right]{\LARGE{Arbre de \emph{« pointcuts »}}};
\end{tikzpicture}
\end{frame}

\begin{frame}[fragile]{Exemple d'interface (\texttt{.rti})}
\begin{tikzpicture}
\draw (0,0) node[right]{%
\begin{minipage}{100mm}
\lstset{numbers=left}
\begin{lstlisting}
/*
 * This interface describes the basic needs for any
 * loadable kernel module
 */
interface LKM : Builtins
{
    builtin  type       Device;

    provided pointcut   include_dependencies;
    provided pointcut   global_data_declaration;
    provided pointcut   code_declaration;
    provided pointcut   lkm_base_code_definition;

    provided sequence       load() {
        provided pointcut   lkm_init_fptrs;
        provided chunk      lkm_base_code_definition;
    }

    provided sequence       unload() {
        provided pointcut   unload_setup;
        provided chunk      lkm_base_code_definition;
    }

    required variable Builtins::string OS;
    required variable Builtins::serial version;
}
\end{lstlisting}
\end{minipage}};
\end{tikzpicture}
\end{frame}

\begin{frame}[fragile]{Exemple de template (\texttt{.blt})}
\begin{tikzpicture}
\draw (0,0) node[right]{%
\begin{minipage}{121mm}
\lstset{numbers=left}
\begin{lstlisting}
with LKM {
    ${pointcut include_dependencies};
    ${pointcut global_data_declaration};
    ${pointcut code_declaration};
    ${pointcut lkm_base_code_definition};
}
with LKM
values OS=Linux, version>=2.6.24 {
    template sequence load() {
        chunk lkm_base_code_definition {
            int modentry() { /* Init some stuff here */ }
            module_init(modentry);
        }
        chunk global_data_declaration {
            struct module myModule = {
                ${pointcut lkm_init_fptrs
                  default:
                      .module_open = NULL;
                 },
            };
        }
    }
}
\end{lstlisting}
\end{minipage}};
\end{tikzpicture}
\end{frame}

\begin{frame}[fragile]{Exemple d'implémentation de pilote (\texttt{.rtx})}
\begin{tikzpicture}
\draw (0,0) node[right]{%
\begin{minipage}{70mm}
\lstset{numbers=left}
\begin{lstlisting}
device myDriver
{
    /* Registers description */
}

driver myDriver
{
    Userland::open(Context ctx) {
        log("Opening device...\n");
    }
    Userland::close(Context ctx) {
        log("Closing device...\n");
    }
}

configuration
{
    LKM::devices = myDriver;
    LKM::arch = x86;
    LKM::OS=Linux {
        LKM::version = 2.6.34;
    }
    LKM::OS=Windows7 {
    }
};
\end{lstlisting}
\end{minipage}};
\end{tikzpicture}
\end{frame}




\begin{frame}{Avancement du projet}
\begin{center}
\begin{tikzpicture}
\node (P) at (0,2.5) {\LARGE{pilotes}};
\node (C) at (0,-2.5) {\LARGE{\cemph{compilateur}}};
\draw (-5,0) node[above left] {\LARGE{Itérations :}};
\draw[warrow] (-1.25,2.165) arc(120:240:2.5);
\draw[warrow] (1.25,-2.165) arc(-60:60:2.5);
\end{tikzpicture}
\end{center}
\end{frame}

\begin{frame}{Prochaines étapes}
	\begin{center}
        \Large{%
	\begin{itemize}
		\item	Fosdem 2012;
		\item	Fin EIP;
		\item	Évolution vers Python $\rightarrow$ contributeur.
	\end{itemize}
        }
	\end{center}
\end{frame}

\begin{frame}{Questions}
\begin{center}
\Huge{Merci}

\end{center}

%\hspace{1em}\rule{5cm}{0.2mm}
\vspace{2em}
\begin{itemize}
\item \Large{\texttt{http://www.rathaxes.org/}}
\item \Large{\texttt{\#rathaxes} sur \texttt{irc.freenode.net}}
\end{itemize}
\end{frame}

\end{document}
